package com.lancoo.znbkxx.teacher.adapter

import android.text.Html
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.lancoo.znbkxx.teacher.R
import com.lancoo.znbkxx.teacher.model.data.RecQuesID
import com.lancoo.znbkxx.teacher.utils.HtmlUtils
import kotlinx.android.synthetic.main.item_example_wrongproblem.view.*
import kotlinx.android.synthetic.main.item_expand_train.view.*
import kotlinx.android.synthetic.main.item_expand_train.view.tv_content
import kotlinx.android.synthetic.main.item_expand_train.view.tv_type_name

/**
 * Created by wealive on 2021/3/1.
 *
 *
 */
class ExpandTrainAdapter(private val typeName: String, data: MutableList<RecQuesID>) :
        BaseQuickAdapter<RecQuesID, BaseViewHolder>(data) {
    init {
        mLayoutResId = R.layout.item_expand_train
    }

    override fun convert(helper: BaseViewHolder, item: RecQuesID?) {
        with(helper.itemView) {
            tv_content.text = HtmlUtils.setText(item?.QuesBrief!!)
            tv_type_name.text = typeName
        }
    }
}